fn main() {
    // 进制字面量
    let a1 = -124;
    let a2 = 0xff;
    let a3 = 0o13;
    let a4 = 0b10;
    println!("{a1} {a2} {a3} {a4}");

    // Max Min
    println!("u32 max: {}", std::u32::MAX);
    println!("u32 min: {}", u32::MIN);
    println!("usize max: {}", usize::MAX);
    println!("isize is {} bytes", std::mem::size_of::<isize>());
    println!("usize is {} bytes", std::mem::size_of::<usize>());
    println!("i32 is {} bytes", std::mem::size_of::<i32>());
    println!("i64 is {} bytes", std::mem::size_of::<i64>());
    println!("u64 is {} bytes", std::mem::size_of::<u64>());

    // 浮点字面量
    let f1: f32 = 1.12345;
    let f2: f64 = 9.12345;
    println!("Float: {:.2} {:.3}", f1, f2);

    // 布尔字面量
    let is_ok = true;
    let can_ok = false;
    println!("is_ok: {}, can_ok: {}", is_ok, can_ok);

    // 字符字面量
    let char_a = 'a';
    let char_emoji = '😄';
    println!("you get {char_a} feel {char_emoji}");
    println!("{}", char_a as usize);
    println!("{}", char_a as i32);
}
